How to write a very basic compiler [closed]

Posted by Ali on Programmers See other posts from Programmers or by Ali
Published on 2012-09-20T15:53:01Z Indexed on 2012/09/20 21:52 UTC
Read the original article Hit count: 361

Filed under:
|
|
|
|

Possible Duplicate:
Best Online resources to learn about Compilers?
What would be the best way to learn about compilers, and executable formats?

Advanced compilers like gcc compile codes into machine readable files according to the language in which the code has been written (e.g. C, C++, etc). In fact, they interpret the meaning of each codes according to library and functions of the corresponding languages. Correct me if I'm wrong.

I wish to better understand compilers by writing a very basic compiler (probably in C) to compile a static file (e.g. Hello World in a text file). I tried some tutorials and books, but all of them are for practical cases. They deal with compiling dynamic codes with meanings connected with the corresponding language.

How can I write a basic compiler to convert a static text into a machine readable file?

The next step will be introducing variables into the compiler; imagine that we want to write a compiler which compile only some functions of a language.

Introducing practical tutorials and resources is highly appreciated :-)

© Programmers or respective owner

Related posts about c

    Related posts about compilers